<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <title>TODO supply a title</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link rel="shortcut icon" href="favicon.ico"> <link href="./src/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
        <link href="./src/css/font-awesome.css?v=4.4.0" rel="stylesheet">
        <link href="./src/css/plugins/iCheck/custom.css" rel="stylesheet">
        <link href="./src/css/animate.css" rel="stylesheet">
        <link href="./src/css/style.css?v=4.1.0" rel="stylesheet">
        <link href="./src/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
        <link href="./src/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
        <script type="text/javascript" src="src/js/jquery.min.js"></script>
        <script src="./src/js/jquery.min.js?v=2.1.4"></script>
        <script src="./src/js/bootstrap.min.js?v=3.3.6"></script>
        <script src="./src/js/content.js?v=1.0.0"></script>
        <script src="./src/js/plugins/sweetalert/sweetalert.min.js"></script>
        <script>
            $(function() {
                var row = <?php echo $this->row_val; ?>;
                $(".row_" + row).css("display", "none");

                $('.tbody').click(function() {
                    if ($(this).hasClass('main_in_tr_content_cur')) {
                        var dos = 1;
                    }
                    $('.tbody').removeClass('main_in_tr_content_cur');
                    if (dos != 1) {
                        $(this).addClass('main_in_tr_content_cur');
                    }
                });

                $('#baocun').click(function() {
                    var nickname = $("#nickname").val();
                    var code = $("#code").val();
                    var name = $("#name").val();
                    var enname = $("#enname").val();
                    var tax = $("#tax").val();
                    var is_same = 0;
                    $('input[name="is_same"]:checked').each(function() {
                        is_same = $(this).val();
                    });
                    var remind = $("#remind").val();
                    var remind_people = $("#remind_people").val();
                    var debt_max = $("#debt_max").val();
                    var back_limit = $("#back_limit").val();
                    var address = $("#address").val();
                    var remark = $("#remark").val();

                    var con_name = $("#con_name").val();
                    var telephone = $("#telephone").val();
                    var cellphone = $("#cellphone").val();
                    var fax = $("#fax").val();
                    var email = $("#email").val();
                    var qq = $("#qq").val();


                    $.post("./?m=customer&a=docustomadd", {remind_people: remind_people, nickname: nickname, code: code, name: name, enname: enname, tax: tax, is_same: is_same, remind: remind, debt_max: debt_max, back_limit: back_limit, address: address, remark: remark, con_name: con_name, telephone: telephone, cellphone: cellphone, fax: fax, email: email, qq: qq}, function(result) {
                        if (result > 0) {
                            swal({
                                title: "提交数据成功",
                                text: "THIS IS OK。"
                            }, function() {
                                location.href = "./?m=customer&a=list";
                            });
                        } else {
                            swal({
                                title: "提交数据失败",
                                text: "THIS IS ERROR。"
                            }, function() {
                                location.href = "./?m=customer&a=list";
                            });
                        }
                        ;
                    });
                });

                $("#update_val").click(function() {
                    var nickname = $(".main_in_tr_content_cur").find('td').eq(1).html();
                    var code = $(".main_in_tr_content_cur").find('td').eq(2).html();
                    var name = $(".main_in_tr_content_cur").find('td').eq(3).html();
                    var enname = $(".main_in_tr_content_cur").find('td').eq(4).html();
                    var tax = $(".main_in_tr_content_cur").find('td').eq(6).html();
                    var remind = $(".main_in_tr_content_cur").find('.remind').html();
                    var remind_people = $(".main_in_tr_content_cur").find('.remind_people').html();
                    var debt_max = $(".main_in_tr_content_cur").find('.debt_max').html();
                    var back_limit = $(".main_in_tr_content_cur").find('.back_limit').html();
                    var address = $(".main_in_tr_content_cur").find('.address').html();
                    var remark = $(".main_in_tr_content_cur").find('.remark').html();
                    var is_same = $(".main_in_tr_content_cur").find('.is_same').html();
                    if (is_same == 1) {
                        $("[name = update_is_same]:checkbox").attr("checked", true);
                    }
                    var id = $(".main_in_tr_content_cur").find('td').eq(0).html();
                    if (id == undefined) {
                        swal({
                            title: "请选择列表",
                            text: "THIS IS ERROR。"
                        });
                        return false;
                    }
                    $("#update_nickname").val(nickname);
                    $("#update_code").val(code);
                    $("#update_name").val(name);
                    $("#update_tax").val(tax);
                    $("#update_enname").val(enname);
                    $("#update_remind").val(remind);
                    $("#update_debt_max").val(debt_max);
                    $("#update_back_limit").find('option[value=' + back_limit + ']').prop("selected", true);
                    $("#update_remind_people").find('option[value=' + remind_people + ']').prop("selected", true);
                    $("#update_address").val(address);
                    $("#update_remark").val(remark);
                });

                $("#con_update_val").click(function() {
                    var con_name = $(".main_in_tr_content_cur").find('td').eq(2).html();
                    var cellphone = $(".main_in_tr_content_cur").find('td').eq(3).html();
                    var telephone = $(".main_in_tr_content_cur").find('td').eq(4).html();
                    var fax = $(".main_in_tr_content_cur").find('td').eq(5).html();
                    var email = $(".main_in_tr_content_cur").find('td').eq(6).html();
                    var qq = $(".main_in_tr_content_cur").find('td').eq(7).html();

                    var id = $(".main_in_tr_content_cur").find('td').eq(0).html();
                    if (id == undefined) {
                        swal({
                            title: "请选择列表",
                            text: "THIS IS ERROR。"
                        });
                        return false;
                    }
                    $("#update_con_name").val(con_name);
                    $("#update_telephone").val(telephone);
                    $("#update_cellphone").val(cellphone);
                    $("#update_fax").val(fax);
                    $("#update_email").val(email);
                    $("#update_qq").val(qq);
                });

                $('#do_update').click(function() {
                    var nickname = $("#update_nickname").val();
                    var code = $("#update_code").val();
                    var name = $("#update_name").val();
                    var enname = $("#update_enname").val();
                    var tax = $("#update_tax").val();
                    var is_same = 0;
                    $('input[name="update_is_same"]:checked').each(function() {
                        is_same = $(this).val();
                    });
                    var remind = $("#update_remind").val();
                    var remind_people = $("#update_remind_people").val();
                    var debt_max = $("#update_debt_max").val();
                    var back_limit = $("#update_back_limit").val();
                    var address = $("#update_address").val();
                    var remark = $("#update_remark").val();

                    var id = $(".main_in_tr_content_cur").find('td').eq(0).html();
                    $.post("./?m=customer&a=docustomupdate", {remind_people: remind_people, nickname: nickname, code: code, name: name, enname: enname, tax: tax, is_same: is_same, remind: remind, debt_max: debt_max, back_limit: back_limit, address: address, remark: remark, id: id}, function(result) {
                        if (result > 0) {
                            swal({
                                title: "提交数据成功",
                                text: "THIS IS OK。"
                            }, function() {
                                location.href = "./?m=customer&a=list&row_val=2";
                            })
                        } else {
                            swal({
                                title: "提交数据失败",
                                text: "THIS IS ERROR。"
                            }, function() {
                                location.href = "./?m=customer&a=list&row_val=2";
                            });
                        }
                        ;
                    });
                });

                $('#do_conupdate').click(function() {
                    var con_name = $("#update_con_name").val();
                    var telephone = $("#update_telephone").val();
                    var cellphone = $("#update_cellphone").val();
                    var fax = $("#update_fax").val();
                    var email = $("#update_email").val();
                    var qq = $("#update_qq").val();
                    var id = $(".main_in_tr_content_cur").find('td').eq(0).html();
                    $.post("./?m=customer&a=docustom_conupdate", {con_name: con_name, telephone: telephone, cellphone: cellphone, fax: fax, email: email, qq: qq, id: id}, function(result) {
                        if (result > 0) {
                            swal({
                                title: "提交数据成功",
                                text: "THIS IS OK。"
                            }, function() {
                                location.href = "./?m=customer&a=list&row_val=1";
                            })
                        } else {
                            swal({
                                title: "提交数据失败",
                                text: "THIS IS ERROR。"
                            }, function() {
                                location.href = "./?m=customer&a=list&row_val=1";
                            });
                        }
                        ;
                    });
                });

                $("#do_no").click(function() {
                    var id = $(".main_in_tr_content_cur").find('td').eq(0).html();
                    if (id != undefined) {
                        $.post("./?m=customer&a=docustomdel", {id: id, type: 2}, function(result) {
                            if (result > 0) {
                                swal({
                                    title: "数据休眠成功",
                                    text: "THIS IS OK。"
                                }, function() {
                                    location.href = "./?m=customer&a=list&row_val=2";
                                });
                            } else {
                                swal({
                                    title: "数据休眠失败",
                                    text: "THIS IS ERROR。"
                                }, function() {
                                    location.href = "./?m=customer&a=list&row_val=2";
                                });
                            }
                            ;
                        });
                    } else {
                        swal({
                            title: "请选择列表",
                            text: "THIS IS ERROR。"
                        });
                        return false;
                    }

                });

                $("#do_yes").click(function() {
                    var id = $(".main_in_tr_content_cur").find('td').eq(0).html();
                    if (id != undefined) {
                        $.post("./?m=customer&a=docustomdel", {id: id, type: 1}, function(result) {
                            if (result > 0) {
                                swal({
                                    title: "数据激活成功",
                                    text: "THIS IS OK。"
                                }, function() {
                                    location.href = "./?m=customer&a=list&row_val=2";
                                });
                            } else {
                                swal({
                                    title: "数据激活失败",
                                    text: "THIS IS ERROR。"
                                }, function() {
                                    location.href = "./?m=customer&a=list&row_val=2";
                                });
                            }
                            ;
                        });
                    } else {
                        swal({
                            title: "请选择列表",
                            text: "THIS IS ERROR。"
                        });
                        return false;
                    }

                });

                $("#delete").click(function() {
                    var id = $(".main_in_tr_content_cur").find('td').eq(0).html();
                    if (id != undefined) {
                        $.post("./?m=customer&a=docustomdel", {id: id, type: 0}, function(result) {
                            if (result > 0) {
                                swal({
                                    title: "数据删除成功",
                                    text: "THIS IS OK。"
                                }, function() {
                                    location.href = "./?m=customer&a=list&row_val=2";
                                });
                            } else {
                                swal({
                                    title: "数据删除失败",
                                    text: "THIS IS ERROR。"
                                }, function() {
                                    location.href = "./?m=customer&a=list&row_val=2";
                                });
                            }
                            ;
                        });
                    } else {
                        swal({
                            title: "请选择列表",
                            text: "THIS IS ERROR。"
                        });
                        return false;
                    }

                });

                $("#do_conno").click(function() {
                    var id = $(".main_in_tr_content_cur").find('td').eq(0).html();
                    if (id != undefined) {
                        $.post("./?m=customer&a=docustom_condel", {id: id, type: 2}, function(result) {
                            if (result > 0) {
                                swal({
                                    title: "数据休眠成功",
                                    text: "THIS IS OK。"
                                }, function() {
                                    location.href = "./?m=customer&a=list&row_val=1";
                                });
                            } else {
                                swal({
                                    title: "数据休眠失败",
                                    text: "THIS IS ERROR。"
                                }, function() {
                                    location.href = "./?m=customer&a=list&row_val=1";
                                });
                            }
                            ;
                        });
                    } else {
                        swal({
                            title: "请选择列表",
                            text: "THIS IS ERROR。"
                        });
                        return false;
                    }

                });

                $("#do_conyes").click(function() {
                    var id = $(".main_in_tr_content_cur").find('td').eq(0).html();
                    if (id != undefined) {
                        $.post("./?m=customer&a=docustom_condel", {id: id, type: 1}, function(result) {
                            if (result > 0) {
                                swal({
                                    title: "数据激活成功",
                                    text: "THIS IS OK。"
                                }, function() {
                                    location.href = "./?m=customer&a=list&row_val=1";
                                });
                            } else {
                                swal({
                                    title: "数据激活失败",
                                    text: "THIS IS ERROR。"
                                }, function() {
                                    location.href = "./?m=customer&a=list&row_val=1";
                                });
                            }
                            ;
                        });
                    } else {
                        swal({
                            title: "请选择列表",
                            text: "THIS IS ERROR。"
                        });
                        return false;
                    }

                });

                $("#del").click(function() {
                    var id = $(".main_in_tr_content_cur").find('td').eq(0).html();
                    if (id != undefined) {
                        $.post("./?m=customer&a=docustom_condel", {id: id, type: 0}, function(result) {
                            if (result > 0) {
                                swal({
                                    title: "数据删除成功",
                                    text: "THIS IS OK。"
                                }, function() {
                                    location.href = "./?m=customer&a=list&row_val=1";
                                });
                            } else {
                                swal({
                                    title: "数据删除失败",
                                    text: "THIS IS ERROR。"
                                }, function() {
                                    location.href = "./?m=customer&a=list&row_val=1";
                                });
                            }
                            ;
                        });
                    } else {
                        swal({
                            title: "请选择列表",
                            text: "THIS IS ERROR。"
                        });
                        return false;
                    }

                });

                $("#contact_list").click(function() {
                    $(".row_1").hide();
                    $(".row_2").show();
                });

                $("#custom_list").click(function() {
                    $(".row_2").hide();
                    $(".row_1").show();
                });

            });
        </script>
    </head>
    <body>
        <div class="ibox-content">
            <form class="form-horizontal">
                <input type="hidden" name="m" value="customer">
                <input type="hidden" name="a" value="list">
                <div class="form-group">
                    <label class="col-sm-2 control-label w100">客户简称：</label>
                    <div class="col-sm-2">
                        <input  class="form-control m-b" name="nickname" style="padding-top:2px;" value="<?php echo $this->nickname ?>">
                    </div>
                    <label class="col-sm-2 control-label w100">当前状态：</label>
                    <div class="col-sm-2">
                        <select class="form-control m-b" id="search_type" name="search_type" style="padding-top:2px;">
                            <option value="3">全部</option>
                            <option <?php echo $this->status == 1 ? 'selected' : ''; ?> value="1">激活</option>
                            <option <?php echo $this->status == 2 ? 'selected' : ''; ?> value="2">休眠</option>
                        </select>
                    </div>
                    <div class="col-sm-2">
                        <button class="btn btn-sm btn-info" type="submit">搜索</button>
                    </div>
                </div>


            </form>
        </div>
        <div class="row row_1">
            <div class="ibox float-e-margins" style="width:98%;margin-left:1%;">
                <div class="ibox-title">
                    <button class="btn btn-success " style="margin-top:-10px;" type="button" data-toggle="modal" data-target="#myModal5"><span class="bold">新增</span></button>   
                    <button class="btn btn-success " style="margin-top:-10px;" type="button" data-toggle="modal" data-target="#update" id="update_val"><span class="bold">修改</span></button>  
                    <button class="btn btn-success " style="margin-top:-10px;" type="button" data-toggle="modal" data-target="#" id="do_no" ><span class="bold">休眠</span></button>
                    <button class="btn btn-success " style="margin-top:-10px;" type="button" data-toggle="modal" data-target="#" id="do_yes" ><span class="bold">激活</span></button>    
                    <button class="btn btn-success " style="margin-top:-10px;" type="button" data-toggle="modal" data-target="#" id="delete" ><span class="bold">删除</span></button>  
                    <button class="btn btn-success " style="margin-top:-10px;" type="button" data-toggle="modal" data-target="#"><span class="bold">查看</span></button>  
                    <button class="btn btn-success " style="margin-top:-10px;" type="button" data-toggle="modal" data-target="#"><span class="bold">客户费用</span></button>  
                    <button class="btn btn-success " style="margin-top:-10px;" type="button" data-toggle="modal" data-target="#contact" id="contact_list"><span class="bold">客户联系人</span></button>  
                </div>
                <div class="ibox-content">

                    <table class="table table-bordered">
                        <thead>
                            <tr>
                                <th>序号</th>
                                <th>客户简称</th>
                                <th>客户编号</th>
                                <th>客户名称</th>
                                <th>英文名称</th>
                                <th>创建时间</th>
                                <th>税率</th>
                                <th>当前状态</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php $qq = 1;
                            foreach ($this->data as $k => $v) {
                                ?>
                                <tr class="tbody">
                                    <td><?php echo $qq; ?></td>
                                    <td><?php echo $v['nickname'] ?></td>
                                    <td><?php echo $v['code'] ?></td>
                                    <td><?php echo $v['name'] ?></td>
                                    <td><?php echo $v['enname'] ?></td>
                                    <td><?php echo $v['createtime'] ?></td>
                                    <td><?php echo $v['tax'] ?></td>
                                    <td><?php echo ($v['status'] == 1) ? '激活' : '休眠' ?></td>
                                    <td style="display: none" class="remark"><?php echo $v['is_same'] ?></td>
                                    <td style="display: none" class="remind"><?php echo $v['remind'] ?></td>
                                    <td style="display: none" class="remind_people"><?php echo $v['remind_people'] ?></td>
                                    <td style="display: none" class="debt_max"><?php echo $v['debt_max'] ?></td>
                                    <td style="display: none" class="back_limit"><?php echo $v['back_limit'] ?></td>
                                    <td style="display: none" class="address"><?php echo $v['address'] ?></td>
                                    <td style="display: none" class="remark"><?php echo $v['remark'] ?></td>
                                </tr>
                                <?php $qq++;
                            }
                            ?>
                        </tbody>
                    </table>

                </div>
            </div>
        </div>
        <!----联系人------>
        <div class="row row_2">
            <div class="ibox float-e-margins" style="width:98%;margin-left:1%;">
                <div class="ibox-title">
                    <button class="btn btn-success " style="margin-top:-10px;" type="button" data-toggle="modal" data-target="#myModal5"><span class="bold">新增</span></button>   
                    <button class="btn btn-success " style="margin-top:-10px;" type="button" data-toggle="modal" data-target="#con_update" id="con_update_val"><span class="bold">修改</span></button>  
                    <button class="btn btn-success " style="margin-top:-10px;" type="button" data-toggle="modal" data-target="#del" id="do_conno"><span class="bold">休眠</span></button>
                    <button class="btn btn-success " style="margin-top:-10px;" type="button" data-toggle="modal" data-target="#del" id="do_conyes"><span class="bold">激活</span></button>
                    <button class="btn btn-success " style="margin-top:-10px;" type="button" data-toggle="modal" data-target="#del" id="del"><span class="bold">删除</span></button>
                    <button class="btn btn-success " style="margin-top:-10px;" type="button" data-toggle="modal" data-target="#"><span class="bold">查看</span></button>  
                    <button class="btn btn-success " style="margin-top:-10px;" type="button" data-toggle="modal" data-target="#"><span class="bold">客户费用</span></button>  
                    <button class="btn btn-success " style="margin-top:-10px;" type="button" data-toggle="modal" data-target="#" id="custom_list"><span class="bold">客户用户</span></button>  
                </div>
                <div class="ibox-content">

                    <table class="table table-bordered">
                        <thead>
                            <tr>
                                <th>序号</th>
                                <th>所属客户</th>
                                <th>姓名</th>
                                <th>联系人电话</th>
                                <th>手机号码</th>
                                <th>传真号码</th>
                                <th>电子邮箱</th>
                                <th>qq</th>
                                <th>当前状态</th>
                            </tr>
                        </thead>
                        <tbody>
<?php $qq = 1;
foreach ($this->data2 as $k => $v) {
    ?>
                                <tr class="tbody">
                                    <td><?php echo $qq; ?></td>
                                    <td><?php echo $v['custom_name'] ?></td>
                                    <td><?php echo $v['name'] ?></td>
                                    <td><?php echo $v['cellphone'] ?></td>
                                    <td><?php echo $v['telephone'] ?></td>
                                    <td><?php echo $v['fax'] ?></td>
                                    <td><?php echo $v['email'] ?></td>
                                    <td><?php echo $v['qq'] ?></td>
                                    <td><?php echo ($v['status'] == 1) ? '激活' : '休眠' ?></td>
                                </tr>
    <?php $qq++;
}
?>
                        </tbody>
                    </table>

                </div>
            </div>
        </div>
        <div class="admin-table-page" style="margin-left:20px;">
            <div id="page" class="page">
<?php echo $this->paging; ?>
            </div>
        </div>
        <div class="modal inmodal fade" id="myModal5" tabindex="-1" role="dialog"  aria-hidden="true">
            <div class="modal-dialog modal-lg">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                        <h4 class="modal-title">客户信息资料</h4>
                    </div>
                    <div class="modal-body">
                        <div class="ibox float-e-margins">
                            <div class="ibox-title">
                                <h5>客户新增</h5>
                            </div>
                            <div class="ibox-content">
                                <form role="form" class="form-horizontal">
                                    <input type="hidden" name="m" value="area" />
                                    <input type="hidden" name="a" value="" />
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">客户简称：</label>
                                        <div class="col-sm-4">
                                            <input class="form-control m-b" type="text" id="nickname" />
                                        </div>
                                        <label class="col-sm-2 control-label">客户编号：</label>
                                        <div class="col-sm-4">
                                            <input class="form-control m-b" type="text" id="code" />
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">客户名称：</label>
                                        <div class="col-sm-8">
                                            <input class="form-control m-b" type="text" id="name" />
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">英文名称：</label>
                                        <div class="col-sm-8">
                                            <input class="form-control m-b" type="text" id="enname" />
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">税率：</label>
                                        <div class="col-sm-2">
                                            <input class="form-control m-b" type="text" id="tax" />
                                        </div>
                                        <div class="col-sm-2">
                                            <div class="checkbox i-checks">
                                                <label>
                                                    <input type="checkbox" name="is_same" value="1"> <i></i> 同行</label>
                                            </div>
                                        </div>
                                        <label class="col-sm-2 control-label">提醒天数：</label>
                                        <div class="col-sm-4">
                                            <input class="form-control m-b" type="text" id="remind" />
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">欠款上限：</label>
                                        <div class="col-sm-4">
                                            <input class="form-control m-b" type="text" id="debt_max" />
                                        </div>
                                        <label class="col-sm-2 control-label">提醒人：</label>
                                        <div class="col-sm-4">
                                            <select class="form-control m-b" name="account" id="remind_people" style="padding-top:2px;">
                                                <option value="1">选项 1</option>
                                                <option value="2">选项 2</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">回款期限：</label>
                                        <div class="col-sm-4">
                                            <select class="form-control m-b" name="account" id="back_limit" style="padding-top:2px;">
                                                <option value="10">一个月</option>
                                                <option value="20">三个月</option>
                                                <option value="30">六个月</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">地址：</label>
                                        <div class="col-sm-10">
                                            <textarea class="form-control m-b" type="text" id="address" /></textarea>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">备注：</label>
                                        <div class="col-sm-10">
                                            <textarea class="form-control m-b" type="text" id="remark" /></textarea>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                        <div class="ibox float-e-margins">
                            <div class="ibox-title">
                                <h5>默认联系人信息</h5>
                            </div>
                            <div class="ibox-content">
                                <form role="form" class="form-horizontal">
                                    <input type="hidden" name="m" value="area" />
                                    <input type="hidden" name="a" value="" />
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">姓名：</label>
                                        <div class="col-sm-4">
                                            <input class="form-control m-b" type="text" id="con_name" />
                                        </div>
                                        <label class="col-sm-2 control-label">联系人电话：</label>
                                        <div class="col-sm-4">
                                            <input class="form-control m-b" type="text" id="cellphone" />
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">手机号码：</label>
                                        <div class="col-sm-4">
                                            <input class="form-control m-b" type="text" id="telephone" />
                                        </div>
                                        <label class="col-sm-2 control-label">传真号码：</label>
                                        <div class="col-sm-4">
                                            <input class="form-control m-b" type="text" id="fax" />
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">电子邮箱：</label>
                                        <div class="col-sm-4">
                                            <input class="form-control m-b" type="text" id="email" />
                                        </div>
                                        <label class="col-sm-2 control-label">QQ：</label>
                                        <div class="col-sm-4">
                                            <input class="form-control m-b" type="text" id="qq" />
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>

                    <div class="modal-footer">
                        <button type="button" class="btn btn-white" id="gb" data-dismiss="modal">关闭</button>
                        <button type="button" class="btn btn-primary" id="baocun">保存</button>
                    </div>
                </div>
            </div>
        </div>
        <!----修改----->
        <div class="modal inmodal fade" id="update" tabindex="-1" role="dialog"  aria-hidden="true">
            <div class="modal-dialog modal-lg">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                        <h4 class="modal-title">客户信息资料</h4>
                    </div>
                    <div class="modal-body">
                        <div class="ibox float-e-margins">
                            <div class="ibox-title">
                                <h5>客户修改</h5>
                            </div>
                            <div class="ibox-content">
                                <form role="form" class="form-horizontal">
                                    <input type="hidden" name="m" value="area" />
                                    <input type="hidden" name="a" value="" />
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">客户简称：</label>
                                        <div class="col-sm-4">
                                            <input class="form-control m-b" type="text" id="update_nickname" />
                                        </div>
                                        <label class="col-sm-2 control-label">客户编号：</label>
                                        <div class="col-sm-4">
                                            <input class="form-control m-b" type="text" id="update_code" />
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">客户名称：</label>
                                        <div class="col-sm-8">
                                            <input class="form-control m-b" type="text" id="update_name" />
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">英文名称：</label>
                                        <div class="col-sm-8">
                                            <input class="form-control m-b" type="text" id="update_enname" />
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">税率：</label>
                                        <div class="col-sm-2">
                                            <input class="form-control m-b" type="text" id="update_tax" />
                                        </div>
                                        <div class="col-sm-2">
                                            <div class="checkbox i-checks">
                                                <label>
                                                    <input type="checkbox" name="update_is_same" value="1"> <i></i> 同行</label>
                                            </div>
                                        </div>
                                        <label class="col-sm-2 control-label">提醒天数：</label>
                                        <div class="col-sm-4">
                                            <input class="form-control m-b" type="text" id="update_remind" />
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">欠款上限：</label>
                                        <div class="col-sm-4">
                                            <input class="form-control m-b" type="text" id="update_debt_max" />
                                        </div>
                                        <label class="col-sm-2 control-label">提醒人：</label>
                                        <div class="col-sm-4">
                                            <select class="form-control m-b" name="account" id="update_remind_people" style="padding-top:2px;">
                                                <option value="1">选项 1</option>
                                                <option value="2">选项 2</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">回款期限：</label>
                                        <div class="col-sm-4">
                                            <select class="form-control m-b" name="account" id="update_back_limit" style="padding-top:2px;">
                                                <option value="10">一个月</option>
                                                <option value="20">三个月</option>
                                                <option value="30">六个月</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">地址：</label>
                                        <div class="col-sm-10">
                                            <textarea class="form-control m-b" type="text" id="update_address" /></textarea>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">备注：</label>
                                        <div class="col-sm-10">
                                            <textarea class="form-control m-b" type="text" id="update_remark" /></textarea>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>

                    <div class="modal-footer">
                        <button type="button" class="btn btn-white" id="gb" data-dismiss="modal">关闭</button>
                        <button type="button" class="btn btn-primary" id="do_update">保存</button>
                    </div>
                </div>
            </div>
        </div>
        <!---联系人修改---->
        <div class="modal inmodal fade" id="con_update" tabindex="-1" role="dialog"  aria-hidden="true">
            <div class="modal-dialog modal-lg">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                        <h4 class="modal-title">客户联系人信息资料</h4>
                    </div>
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5>联系人信息</h5>
                        </div>
                        <div class="ibox-content">
                            <form role="form" class="form-horizontal">
                                <input type="hidden" name="m" value="area" />
                                <input type="hidden" name="a" value="" />
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">姓名：</label>
                                    <div class="col-sm-4">
                                        <input class="form-control m-b" type="text" id="update_con_name" />
                                    </div>
                                    <label class="col-sm-2 control-label">联系人电话：</label>
                                    <div class="col-sm-4">
                                        <input class="form-control m-b" type="text" id="update_cellphone" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">手机号码：</label>
                                    <div class="col-sm-4">
                                        <input class="form-control m-b" type="text" id="update_telephone" />
                                    </div>
                                    <label class="col-sm-2 control-label">传真号码：</label>
                                    <div class="col-sm-4">
                                        <input class="form-control m-b" type="text" id="update_fax" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">电子邮箱：</label>
                                    <div class="col-sm-4">
                                        <input class="form-control m-b" type="text" id="update_email" />
                                    </div>
                                    <label class="col-sm-2 control-label">QQ：</label>
                                    <div class="col-sm-4">
                                        <input class="form-control m-b" type="text" id="update_qq" />
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>

                    <div class="modal-footer">
                        <button type="button" class="btn btn-white" id="gb" data-dismiss="modal">关闭</button>
                        <button type="button" class="btn btn-primary" id="do_conupdate">保存</button>
                    </div>
                </div>
            </div>
        </div>
    </body>
</html>
